<h2><?php echo __('Blogs'); ?></h2>
    <div class="tab-content">
    <?php  
   foreach ($blogs as $blog):
            echo '<div class="item">';
			
            $image=$blog['Blog']['image'];
            if($image){
               $resizedFile = 'uploads/images_resize/'.$image;
            
             echo $this->Html->link($this->Html->image($resizedFile), array('controller'=>'blogs', 'action' => 'blogview', $blog['Blog']['id']), array('escape' => false));
}
            if (strlen($blog['Blog']['title']) > 30) {
                echo '<span class="pro-title">'.$this->Html->link(substr($blog['Blog']['title'], 0, 30).'...', array('controller' => 'blogs', 'action' => 'blogview', $blog['Blog']['id'])).'</span>';
            }else {
                echo '<span class="pro-title">'.$this->Html->link($blog['Blog']['title'], array('controller' => 'blogs', 'action' => 'blogview', $blog['Blog']['id'])).'</span>';
            }

         
          
            if (strlen($blog['Blog']['article']) > 200) {
                echo '<span id="dec">'.substr($blog['Blog']['article'], 0, 200).'...'.$this->Html->link('read more',array('controller' => 'blogs', 'action' => 'blogview', $blog['Blog']['id'])).'</span>';
            }else {
                echo '<span id="dec">'.$blog['Blog']['article'].'</span>';
            }
              echo ' <span id="modified_date" style="float: right;">posted date: '.$blog['Blog']['posted_date'].'</span>';
            echo '<div class="clearfix"></div></div>';
			
    endforeach;
     ?>
    </div>

